﻿<!--<p:ZComponent x:Class="Library.Components.ViPostIt.ViPostItView"-->
<p:ZComponent x:Class="ZOIL.Library.Components.ViPostItView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.micrisoft.com/surface/2008"
    xmlns:p="http://hci.uni-konstanz.de/permaedia"
    xmlns:local="clr-namespace:ZOIL.Library.Components"
    p:ZObjectDragDropBehavior.IsDraggable="True"
    p:ZObjectResizeBehavior.IsResizable="True"
    p:ZObjectRotateBehavior.IsRotatable="True"
    p:ZInformationLandscape.ZoomTarget="True" Cursor="Hand" MouseDown="ZComponent_MouseDown" MouseUp="ZComponent_MouseUp"
    p:ZInformationLandscape.ZoomMargin="0,9,0,9" Visibility="Visible">

    <p:ZComponent.RenderTransform>
        <TransformGroup>
            <ScaleTransform x:Name="Scale" ScaleX="1" ScaleY="1"/>
            <RotateTransform x:Name="Rotate"/>
            <TranslateTransform x:Name="Translate" X="0" Y="0"/>
        </TransformGroup>
    </p:ZComponent.RenderTransform>
    
    <p:ZComponent.Resources>
        <!--<local:DummyConverter x:Key="dummyConverter"></local:DummyConverter>-->
        <Storyboard x:Key="MouseDownStoryBoard">
            <DoubleAnimation To="1" Duration="0:0:0.2" Storyboard.TargetName="Scale" Storyboard.TargetProperty="ScaleX"/>
            <DoubleAnimation To="1" Duration="0:0:0.2" Storyboard.TargetName="Scale" Storyboard.TargetProperty="ScaleY"/>
        </Storyboard>
        <Storyboard x:Key="MouseUpStoryBoard">
            <DoubleAnimation To="1.3" Duration="0:0:0.2" Storyboard.TargetName="Scale" Storyboard.TargetProperty="ScaleX"/>
            <DoubleAnimation To="1.3" Duration="0:0:0.2" Storyboard.TargetName="Scale" Storyboard.TargetProperty="ScaleY"/>
        </Storyboard>
        
        <Style TargetType="{x:Type TextBlock}" x:Key="style">
            <Setter Property="Foreground" Value="Black"/>
        </Style>
    </p:ZComponent.Resources> 
    <Grid>
        <p:ZComponentFrames x:Name="PART_SemanticZoom" Focusable="False">
            <p:ZComponentFrame WidthNeeded="0">
                <Grid>
                    <Border Background="Black" Grid.Row="0" Margin="1">
                        <Image x:Name="Test"  Source="{Binding SmallUrl}" Grid.Row="0" Width="200" Stretch="UniformToFill"/>
                    </Border>
                    <Viewbox x:Name="detailViewBox1" Grid.Row="1" Margin="5 0 5 5">
                        <TextBlock Width="100" Height="25"  x:Name="details1" Text="{Binding Title,  UpdateSourceTrigger=PropertyChanged}" FontSize="4" Foreground="Black" 
                                   HorizontalAlignment="Center" VerticalAlignment="Center" 
                                   TextAlignment="Center"  TextWrapping="Wrap">                         
                        </TextBlock>
                    </Viewbox>
                </Grid>                
            </p:ZComponentFrame>
            <p:ZComponentFrame WidthNeeded="200">
                <Grid>
                    <Canvas Width="200" Height="200">
                        <Image x:Name="Test2"  Source="{Binding SmallUrl}" Grid.Row="0" Width="200" Height="200"/>
                        <Border Background="Transparent" Grid.Row="0" Margin="1">
                            
                            <Viewbox StretchDirection="Both" Stretch="Fill"  >
<!-- AnotoPage="{Binding PageID}"-->
                                <local:ZInkCanvas x:Name="DrawingPadCanvas" StrokeCollected="OnStrokeCollected" Height="200" Width="200" Background="Transparent" Strokes="{Binding MyStrokes}" AnotoPage="{Binding PageID}" Opacity="1" EditingMode="None" Visibility="{Binding ElementName=Component, Path=Visibility}"  />
                            </Viewbox>
                            
                        </Border>
                        
                    </Canvas>

                    <TextBlock Width="100" Height="25"  x:Name="details2" Text="{Binding PageID,  UpdateSourceTrigger=PropertyChanged}" FontSize="4" Foreground="Black" 
                                   HorizontalAlignment="Center" VerticalAlignment="Center" 
                                   TextAlignment="Center"  TextWrapping="Wrap">                         
                    </TextBlock>
                    <Canvas HorizontalAlignment="Right" Margin="0,0,-102.5,-122.5" Name="canvas1" Width="112">
                        <Button HorizontalAlignment="Right"  Margin="0,0,-30,100" Name="buttonYellow"  Width="30" Height="30"  Background="Gold" Canvas.Left="0" Canvas.Top="0" Click="buttonYellow_Click" Visibility="Hidden">
                            <Button.RenderTransform>
                                <RotateTransform CenterX="15" CenterY="70" Angle="65"></RotateTransform>
                            </Button.RenderTransform>
                        </Button>
                        <Button Canvas.Left="0" Canvas.Top="0" Height="30" Name="buttonPink" Width="30" Background="Violet" Click="buttonPink_Click" Visibility="Hidden">
                            <Button.RenderTransform>
                                <RotateTransform CenterX="15" CenterY="70" Angle="115"></RotateTransform>
                            </Button.RenderTransform>
                        </Button>
                        <Button Height="30" Name="buttonGreen" Width="30" Background="LightGreen" Canvas.Left="0" Canvas.Top="0" Click="buttonGreen_Click" Visibility="Hidden">
                            <Button.RenderTransform>
                                <RotateTransform CenterX="15" CenterY="70" Angle="20"></RotateTransform>
                            </Button.RenderTransform>
                        </Button>
                        <Button Name="button1" Width="30" Height="30" Background="CornflowerBlue" Click="button1_Click" Canvas.Left="0" Canvas.Top="0" Visibility="Hidden">
                            <Button.RenderTransform>
                                <RotateTransform CenterX="15" CenterY="70" Angle="160" />
                            </Button.RenderTransform>
                        </Button>
                        <Button Canvas.Left="11.11" Canvas.Top="56.661" Height="30" Name="buttonColor" Width="30" Click="buttonColor_Click"></Button>
                    </Canvas>
                </Grid>
            </p:ZComponentFrame>
        </p:ZComponentFrames>
    </Grid>
</p:ZComponent>
